/*
* @author tanyuze
*/
'use strict'
import request from '@/utils/request'

/**
 * 字典
 */
 export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: { dictCode }
  })
}
/**
 * 新建
 */
export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/xsyzg/insert',
    method: 'POST',
    data
  })
}

/**
 * 编辑
 */
export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/xsyzg/update',
    method: 'POST',
    data
  })
}

/**
 * 详情
 */
export function get(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/xsyzg/get',
    method: 'POST',
    data
  })
}

/**
 *列表
 */
export function queryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/xsyzg/queryPage',
    method: 'POST',
    data
  })
}

/**
 *发布/取消发布
 */
export function release(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/xsyzg/release',
    method: 'POST',
    data
  })
}

/**
 *删除
 */
export function deleteById(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/xsyzg/deleteById',
    method: 'POST',
    data
  })
}

/**
 *置顶/取消置顶
 */
export function updateIsTop(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/info/xsyzg/updateIsTop',
    method: 'POST',
    data
  })
}
/**
 * 获取分类树形列表
 */
export function fetchList(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/newsClassify/getClassifyTree',
    method: 'POST',
    data
  })
}
